/**
 * Copyright (c) 2018 软唐 All rights reserved.
 *
 * https://www.softtown.cn
 *
 * 版权所有，侵权必究！
 */

package com.softtown.modules.sys.service;

import com.softtown.common.service.BaseService;
import com.softtown.common.utils.Result;
import com.softtown.modules.sys.dto.CompComDocAttAddDTO;
import com.softtown.modules.sys.entity.CompComDocAttEntity;

import java.util.List;

/**
 * 系统单据附件
 *
 * @author Ding Ya Yong
 * @since 1.0.0
 */
public interface CompComDocAttService extends BaseService<CompComDocAttEntity> {

    /**
     * 根据单据id删除单据附件信息
     * @param docId
     * @param compId
     * @return void
     * @Author fuming
     * @Date 2020/5/27 11:13
     */
    void deleteByDocId(Long docId, Long compId);

    /**
    * 根据单据Id获取附件信息
    * @param  docId 单据id
    * @param  compId 公司id
    * @return List<SysDocAttEntity>
    * @author Dingyayong
    * @date 2019-10-09 18:18
    */
    List<CompComDocAttEntity> getSysDocAttEntityByDocId(Long docId, Long compId);

    /**
    * 根据id删除单据附件信息
    * @param  id 附件id
    * @param  compId 公司id
    * @return Result
    * @author Dingyayong
    * @date 2019-10-11 17:19
    */
    Result deleteDocAttById(Long id, Long compId);

    /**
     * 根据索引删除单据附件信息
     * @param compId
     * @param docTypeValue
     * @param docId
     * @param attUrl
     * @return com.softtown.common.utils.Result
     * @Author fuming
     * @Date 2020/5/27 11:14
     */
    Result deleteDocAttByUrl(Long compId,String docTypeValue,Long docId,String  attUrl);

    /**
    * 添加单据福建
    * @param compComDocAttAddDTO 单据附件DTO
    * @return Result
    * @author Dingyayong
    * @date 2019-10-22 10:01
    */
    Result addDocAtt(CompComDocAttAddDTO compComDocAttAddDTO);
}